﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Blade.IO;

namespace Blade.Metadata.PeLoader {
	sealed class CliStreamHeader {
		public CliStreamHeader(BinaryReader reader) {
			this.Offset = reader.ReadUInt32();
			this.Size = reader.ReadUInt32();
			this.Name = reader.ReadNullTerminatedString(Encoding.ASCII);
			int padding = (int)(4 - (reader.Position() % 4)) % 4;
			reader.ReadBytes(padding);
		}

		public readonly uint Offset;
		public readonly uint Size;
		public readonly string Name;

		public CursorStream Cursor { get; set; }
	}
}
